demo: make demo windows transient to the main window
authorWilliam Jon McCann <william.jon.mccann@gmail.com>
Tue, 3 Dec 2013 02:47:55 +0000 (21:47 -0500)
committerWilliam Jon McCann <william.jon.mccann@gmail.com>
Tue, 3 Dec 2013 15:50:07 +0000 (10:50 -0500)
This prevents them getting lost behind.

demos/gtk-demo/main.c

index 5af0da3cdc23503ebd778e00b3547f342b073772..9de99cd9376b1ef45c8868278c85aa37ea7155f5 100644 (file)
@@ -142,6 +142,9 @@ activate_run (GSimpleAction *action,
           cbdata->model = model;
           cbdata->path = gtk_tree_model_get_path (model, &iter);
 
+          gtk_window_set_transient_for (GTK_WINDOW (demo), GTK_WINDOW (window));
+          gtk_window_set_modal (GTK_WINDOW (demo), TRUE);
+
           g_signal_connect (demo, "destroy",
                             G_CALLBACK (window_closed_cb), cbdata);
         }